<?php
include_once("../../include/lxbase.class.php");
$userip = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"];
if($userip!='103.7.220.216'){
	die(json_encode(array("error"=>1003,"msg"=>"access Forbidden")));
}
$webconn=new Lxbase();
$userid=intval($_GET["userid"]);
if(empty($userid)){die(json_encode(array("error"=>1001,"msg"=>"missing userid")));}
$wxinfo = $webconn->viewdata("*","wxuser","where userid={$userid}");
$wxinfo["username"] = $webconn->oncedata("username","users","where id={$userid}");
if(empty($wxinfo)){die(json_encode(array("error"=>1004,"msg"=>"No such user data")));}
echo json_encode(array("error"=>1000,"msg"=>"success","data"=>$wxinfo));
exit;